import request from '@/utils/request'

// 获取加盟交接表信息列表(带分页)
export function getTransitionList(data) {
  return request({
    url: '/api/crm/transition',
    method: 'GET',
    data
  })
}

// 添加加盟交接表信息
export function createTransition(data) {
  return request({
    url: '/api/crm/transition',
    method: 'POST',
    data
  })
}

// 获取加盟交接表信息
export function getTransitionInfo(id) {
  return request({
    url: `/api/crm/transition/${id}`,
    method: 'GET'
  })
}

// 获取加盟交接表信息
export function getRenewalInfo(id) {
  return request({
    url: `/api/crm/transition/renewal/${id}`,
    method: 'GET'
  })
}

// 修改加盟交接表信息
export function updateTransition(data) {
  return request({
    url: `/api/crm/transition/${data.id}`,
    method: 'PUT',
    data
  })
}

// 删除加盟交接表信息
export function delTransition(id) {
  return request({
    url: `/api/crm/transition/${id}`,
    method: 'DELETE'
  })
}

// 发送交接表邮件
export function sendTransitionEmail(campusId) {
  return request({
    url: `/api/crm/transition/send/email?campusId=${campusId}`,
    method: 'POST'
  })
}
